From: Alan S. <aj...@fr...> - 2007-09-17 04:08:37
|
> Ah, found bug in my code -- how I hate that moronically stupid C > language. Was using &a instead of a for JudyLGet. All too easy. I've made recent use of libJudy myself in my contract job, and even as one of the authors I find it surprisingly difficult to keep the pointer expressions correct. In particular when *Pvalue return by JudyL or JudySL, which it only knows as a word -- no forced interpretation of the contents -- is known to the caller to contain a pointer. So you must first check for Pvalue being null, etc: foo_t * Pfoo; JLG(Pvalue, ...); Pfoo = ((Pvalue == NULL) ? NULL : (foo_t *) (*Pvalue)); It can get confusing, especially when dealing with array-of-array, etc. But it sure has sped up some slow programs dramatically. Alan Silverstein |