From 61d761ece12ca6da8e068dd8280e76eb23e1008a Mon Sep 17 00:00:00 2001 From: Dustin Mitchell Date: Tue, 25 Jan 2000 00:31:15 +0000 Subject: [PATCH] Added a typemap git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@153 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Source/Swig/swig.i | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/SWIG/Source/Swig/swig.i b/SWIG/Source/Swig/swig.i index 9245f7163..82d6096e4 100644 --- a/SWIG/Source/Swig/swig.i +++ b/SWIG/Source/Swig/swig.i @@ -639,6 +639,13 @@ like Python objects, although some functionality may be different."; $target = Swig_PyDOH_new($source); } +%typemap(python,in) char * { + if (Swig_PyDOH_check($source)) + $target = Char(((PyDOH *)$source)->doh); + else + $target = PyString_AsString($source); +} + %title "SWIG", after %section "DOH Objects", before