Re: [libHX-user] HXmap_get not returning the right data with the key
Brought to you by:
jengelh
From: Jan E. <je...@me...> - 2011-02-13 12:33:33
|
On Sunday 2011-02-13 13:30, Jan Engelhardt wrote: >On Sunday 2011-02-13 06:23, Soham Das wrote: > >>int main() >>{ >> int a[]={1,2,3}; >> HXmap_add(limitMap,a,limitMap); >>} > >If you use key copying (HXMAP_CKEY), you need to specify how large >the key actually is - when it is not a string (HXMAP_SKEY). >I will be adding a patch to the library to emit a warning to >catch this case. > >What you would need for your code is > > HXmap_init5(HXMAPT_DEFAULT, HXMAP_CKEY, NULL, sizeof(int *), 0); This should have been just sizeof(int). |