aboutsummaryrefslogtreecommitdiff
path: root/Lib/typemaps/cstrings.swg
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/typemaps/cstrings.swg')
-rw-r--r--Lib/typemaps/cstrings.swg22
1 files changed, 11 insertions, 11 deletions
diff --git a/Lib/typemaps/cstrings.swg b/Lib/typemaps/cstrings.swg
index 0aca61101..7a7e2c1f9 100644
--- a/Lib/typemaps/cstrings.swg
+++ b/Lib/typemaps/cstrings.swg
@@ -50,7 +50,7 @@
*
* %cstring_bounded_output(Char *outx, 512);
* void foo(Char *outx) {
- * sprintf(outx,"blah blah\n");
+ * strcpy(outx,"blah blah\n");
* }
*
*/
@@ -59,7 +59,7 @@
%typemap(in,noblock=1,numinputs=0) TYPEMAP (Char temp[MAX+1]) {
$1 = ($1_ltype) temp;
}
-%typemap(freearg,match="in") TYPEMAP "";
+%typemap(freearg,match="in") TYPEMAP ""
%typemap(argout,noblock=1,fragment= #SWIG_FromCharPtr ) TYPEMAP {
$1[MAX] = 0;
%append_output(SWIG_FromCharPtr($1));
@@ -85,7 +85,7 @@
%typemap(in,noblock=1,numinputs=0) TYPEMAP(Char temp[SIZE]) {
$1 = ($1_ltype) temp;
}
-%typemap(freearg,match="in") TYPEMAP "";
+%typemap(freearg,match="in") TYPEMAP ""
%typemap(argout,noblock=1,fragment= #SWIG_FromCharPtrAndSize) TYPEMAP {
%append_output(SWIG_FromCharPtrAndSize($1,SIZE));
}
@@ -122,7 +122,7 @@
temp[n - 1] = 0;
$1 = ($1_ltype) temp;
}
-%typemap(freearg,match="in") TYPEMAP "";
+%typemap(freearg,match="in") TYPEMAP ""
%typemap(argout,noblock=1,fragment=#SWIG_FromCharPtr) TYPEMAP {
$1[MAX] = 0;
%append_output(SWIG_FromCharPtr($1));
@@ -160,7 +160,7 @@
if (alloc == SWIG_NEWOBJ) %delete_array(t);
$1[n-1] = 0;
}
-%typemap(freearg,match="in") TYPEMAP "";
+%typemap(freearg,match="in") TYPEMAP ""
%typemap(argout,noblock=1,fragment=#SWIG_FromCharPtr) TYPEMAP {
%append_output(SWIG_FromCharPtr($1));
%delete_array($1);
@@ -175,7 +175,7 @@
*
* %cstring_output_maxsize(Char *outx, int max) {
* void foo(Char *outx, int max) {
- * sprintf(outx,"blah blah\n");
+ * strcpy(outx,"blah blah\n");
* }
*/
@@ -205,7 +205,7 @@
*
* %cstring_output_withsize(Char *outx, int *max) {
* void foo(Char *outx, int *max) {
- * sprintf(outx,"blah blah\n");
+ * strcpy(outx,"blah blah\n");
* *max = strlen(outx);
* }
*/
@@ -239,7 +239,7 @@
* %cstring_output_allocate(Char **outx, free($1));
* void foo(Char **outx) {
* *outx = (Char *) malloc(512);
- * sprintf(outx,"blah blah\n");
+ * strcpy(outx,"blah blah\n");
* }
*/
@@ -247,7 +247,7 @@
%typemap(in,noblock=1,numinputs=0) TYPEMAP($*1_ltype temp = 0) {
$1 = &temp;
}
-%typemap(freearg,match="in") TYPEMAP "";
+%typemap(freearg,match="in") TYPEMAP ""
%typemap(argout,noblock=1,fragment=#SWIG_FromCharPtr) TYPEMAP {
if (*$1) {
%append_output(SWIG_FromCharPtr(*$1));
@@ -266,7 +266,7 @@
* %cstring_output_allocate_size(Char **outx, int *sz, free($1));
* void foo(Char **outx, int *sz) {
* *outx = (Char *) malloc(512);
- * sprintf(outx,"blah blah\n");
+ * strcpy(outx,"blah blah\n");
* *sz = strlen(outx);
* }
*/
@@ -275,7 +275,7 @@
%typemap(in,noblock=1,numinputs=0) (TYPEMAP, SIZE) ($*1_ltype temp = 0, $*2_ltype tempn) {
$1 = &temp; $2 = &tempn;
}
-%typemap(freearg,match="in") (TYPEMAP,SIZE) "";
+%typemap(freearg,match="in") (TYPEMAP,SIZE) ""
%typemap(argout,noblock=1,fragment=#SWIG_FromCharPtrAndSize)(TYPEMAP,SIZE) {
if (*$1) {
%append_output(SWIG_FromCharPtrAndSize(*$1,*$2));