~ubuntu-branches/ubuntu/edgy/swig1.3/edgy

« back to all changes in this revision

Viewing changes to Lib/java/various.i

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-12-05 01:16:04 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051205011604-ygx904it6413k3go
Tags: 1.3.27-1ubuntu1
Resynchronise with Debian again, for the new subversion packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
        jstring j_string = (jstring)JCALL2(GetObjectArrayElement, jenv, $input, i);
34
34
        const char *c_string = JCALL2(GetStringUTFChars, jenv, j_string, 0);
35
35
#ifdef __cplusplus
36
 
        $1[i] = new char [strlen((c_string)+1)];
 
36
        $1[i] = new char [strlen(c_string)+1];
37
37
#else
38
 
        $1[i] = (char *)calloc(strlen((c_string)+1), sizeof(const char *));
 
38
        $1[i] = (char *)calloc(strlen(c_string)+1, sizeof(const char *));
39
39
#endif
40
40
        strcpy($1[i], c_string);
41
41
        JCALL2(ReleaseStringUTFChars, jenv, j_string, c_string);