1 /* pyzxid.i - SWIG interface file for Python extension for libzxid 2 * Copyright (c) 2008 Symlabs (symlabs@symlabs.com), All Rights Reserved. 3 * Author: Sampo Kellomaki (sampo@iki.fi) 4 * This is confidential unpublished proprietary source code of the author. 5 * NO WARRANTY, not even implied warranties. Contains trade secrets. 6 * Distribution prohibited unless authorized in writing. 7 * Licensed under Apache License 2.0, see file COPYING. 8 * $Id: pyzxid.i,v 1.1 2008-05-08 02:02:40 sampo Exp $ 9 * 7.5.2008, created --Sampo 10 */ 11 %module "zxid" 12 %{ 13 14 #include "errmac.h" 15 #include "zx.h" 16 #include "zxid.h" 17 #include "saml2.h" 18 19 #include "c/zx-const.h" 20 #include "c/zx-data.h" 21 #include "c/zx-ns.h" 22 #include "c/zxidvers.h" 23 24 %} 25 26 %typemap (in) (int len, char* s) { 27 $1 = Z_STRLEN_PP($input); 28 $2 = Z_STRVAL_PP($input); 29 } 30 31 //%typemap (in) struct zx_str* { 32 // $1 = zx_str_dup_len_str(c/* *** where from ctx? */, Z_STRLEN_PP($input), Z_STRVAL_PP($input)); 33 //} 34 35 %typemap (out) struct zx_str* { 36 ZVAL_STRINGL($result, $1->s, $1->len, 1); 37 /* Do not free underlying zx_str because they are usually returned by reference. */ 38 } 39 40 %include "zx.h" 41 %include "zxid.h" 42 %include "saml2.h" 43 44 /* EOF */ 45