add runme.pl file and missing %init

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8215 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-01-04 20:40:47 +00:00
commit 25f12e2784
3 changed files with 19 additions and 2 deletions

View file

@ -3,11 +3,11 @@ SWIG = $(TOP)/../preinst-swig
CXXSRCS = example.cxx
TARGET = example
INTERFACE = example.i
LIBS = -lm
LIBS = -lxerces-c -lxerces-depdom -lm
all::
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' perl5_cpp
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' LIBS=$(LIBS) CXX="g++ -g3" perl5_cpp
static::
$(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \
@ -17,3 +17,7 @@ clean::
$(MAKE) -f $(TOP)/Makefile perl5_clean
check: all
run:
perl runme.pl

View file

@ -0,0 +1,7 @@
use example;
$e1 = new example::XMLChTest();
$e1->set("hello");
print $e1->get(),"\n";

View file

@ -93,6 +93,12 @@ SWIG_FromXMLChPtrAndSize(const XMLCh* input, size_t size)
}
}
%init {
if (!SWIG_UTF8Transcoder()) {
croak("ERROR: XML::Xerces: INIT: Could not create UTF-8 transcoder");
}
}
%include <typemaps/strings.swg>
%typemaps_string(XMLCh, XMLCh,