RE: [OT] JNI problem

2009-10-09 Thread Caldarale, Charles R
> From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Subject: Re: [OT] JNI problem > > C99 probably allows this: > char s[20]; > sizeof s; > > To yield 20, while strict, old-skool C would yield whatever "sizeof > char*" would. Not true; all v

Re: [OT] JNI problem

2009-10-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 10/8/2009 8:27 PM, Caldarale, Charles R wrote: >> From: Christopher Schultz [mailto:ch...@christopherschultz.net] >> Subject: Re: [OT] JNI problem >> >> C99 allows /dynamic/ size determination: > > Sounds

RE: [OT] JNI problem

2009-10-08 Thread Caldarale, Charles R
> From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Subject: Re: [OT] JNI problem > > C99 allows /dynamic/ size determination: Sounds like a flaw in the article; it can't possibly be true, since there is no standard-defined API to discover the size of a malloc&

Re: [OT] JNI problem

2009-10-08 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 10/8/2009 7:24 PM, Caldarale, Charles R wrote: > char array[6]; ... > sizeof array returns 6 This is what I was describing. The Wikipedia article states (I don't have my K&R book in front of me... besides, it wouldn't cover this case, any

RE: [OT] JNI problem

2009-10-08 Thread Caldarale, Charles R
> From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Subject: Re: [OT] JNI problem > > I saw the same thing at first glance, but then I looked-up the sizeof() > operator and it seems that sizeof /can/ return the number of bytes in > an array in C99 Minor correc

Re: [OT] JNI problem

2009-10-08 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Konstantin, On 10/8/2009 4:37 AM, Konstantin Kolinko wrote: > 2009/10/8 Mohamedin : >> Here is one function that always crash. The portion of the code that couse >> the crash in my opinion is the if which has malloc. I noticed it crash >> whenever it