normalize cstring.i to use fragments, and add cwstring.i as a subproduct
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7406 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
549a51eef2
commit
c1416a59a5
11 changed files with 602 additions and 214 deletions
|
|
@ -311,8 +311,8 @@
|
|||
%typemap(in, fragment=#SWIG_AsCharPtrAndSize)
|
||||
(Char *STRING, int LENGTH) (Char *buf, size_t size)
|
||||
{
|
||||
int res = SWIG_AsCharPtrAndSize($input, &buf, &size);
|
||||
if (!res) {SWIG_arg_fail($argnum);SWIG_fail;}
|
||||
SWIG_AsCharPtrAndSize($input, &buf, &size);
|
||||
if (SWIG_arg_fail($argnum)) SWIG_fail;
|
||||
$1 = ($1_ltype) buf;
|
||||
$2 = ($2_ltype) size - 1;
|
||||
}
|
||||
|
|
@ -321,7 +321,8 @@
|
|||
%typemap(in,fragment=#SWIG_AsCharPtrAndSize)
|
||||
(Char *STRING, int SIZE) (Char *buf, size_t size)
|
||||
{
|
||||
if (!SWIG_AsCharPtrAndSize($input, &buf, &size)) {SWIG_arg_fail($argnum);SWIG_fail;}
|
||||
SWIG_AsCharPtrAndSize($input, &buf, &size);
|
||||
if (SWIG_arg_fail($argnum)) SWIG_fail;
|
||||
$1 = ($1_ltype) buf;
|
||||
$2 = ($2_ltype) size;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue