ucl_internal.h (275223) | ucl_internal.h (279549) |
---|---|
1/* Copyright (c) 2013, Vsevolod Stakhov 2 * All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are met: 6 * * Redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer. 8 * * Redistributions in binary form must reproduce the above copyright --- 325 unchanged lines hidden (view full) --- 334 335 336static inline const ucl_object_t * 337ucl_hash_search_obj (ucl_hash_t* hashlin, ucl_object_t *obj) 338{ 339 return (const ucl_object_t *)ucl_hash_search (hashlin, obj->key, obj->keylen); 340} 341 | 1/* Copyright (c) 2013, Vsevolod Stakhov 2 * All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are met: 6 * * Redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer. 8 * * Redistributions in binary form must reproduce the above copyright --- 325 unchanged lines hidden (view full) --- 334 335 336static inline const ucl_object_t * 337ucl_hash_search_obj (ucl_hash_t* hashlin, ucl_object_t *obj) 338{ 339 return (const ucl_object_t *)ucl_hash_search (hashlin, obj->key, obj->keylen); 340} 341 |
342static inline ucl_hash_t * 343ucl_hash_insert_object (ucl_hash_t *hashlin, const ucl_object_t *obj) UCL_WARN_UNUSED_RESULT; | 342static inline ucl_hash_t * ucl_hash_insert_object (ucl_hash_t *hashlin, 343 const ucl_object_t *obj, 344 bool ignore_case) UCL_WARN_UNUSED_RESULT; |
344 345static inline ucl_hash_t * | 345 346static inline ucl_hash_t * |
346ucl_hash_insert_object (ucl_hash_t *hashlin, const ucl_object_t *obj) | 347ucl_hash_insert_object (ucl_hash_t *hashlin, 348 const ucl_object_t *obj, 349 bool ignore_case) |
347{ 348 if (hashlin == NULL) { | 350{ 351 if (hashlin == NULL) { |
349 hashlin = ucl_hash_create (); | 352 hashlin = ucl_hash_create (ignore_case); |
350 } 351 ucl_hash_insert (hashlin, obj, obj->key, obj->keylen); 352 353 return hashlin; 354} 355 356/** 357 * Get standard emitter context for a specified emit_type --- 39 unchanged lines hidden --- | 353 } 354 ucl_hash_insert (hashlin, obj, obj->key, obj->keylen); 355 356 return hashlin; 357} 358 359/** 360 * Get standard emitter context for a specified emit_type --- 39 unchanged lines hidden --- |