swig/Source/Swig/misc.c
Dave Beazley b558974525 First checkin
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@34 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2000-01-11 20:08:25 +00:00

35 lines
853 B
C

/****************************************************************************
* Simplified Wrapper and Interface Generator (SWIG)
*
* Author : David Beazley
*
* Department of Computer Science
* University of Chicago
* 1100 E 58th Street
* Chicago, IL 60637
* beazley@cs.uchicago.edu
*
* Please read the file LICENSE for the copyright and terms by which SWIG
* can be used and distributed.
****************************************************************************/
#include "swigcore.h"
/* -----------------------------------------------------------------------------
* $Header$
*
* misc.c
* ----------------------------------------------------------------------------- */
char *copy_string(const char *s) {
char *c = 0;
if (s) {
c = (char *) malloc(strlen(s)+1);
strcpy(c,s);
}
return c;
}