]> err.no Git - libchamplain/commitdiff
Hand crafted macros for ChamplainMapSourceDesc
authorEmmanuel Rodriguez <emmanuel.rodriguez@gmail.com>
Wed, 6 May 2009 13:51:51 +0000 (15:51 +0200)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Thu, 7 May 2009 12:58:12 +0000 (08:58 -0400)
bindings/perl/Champlain/champlain-perl.h

index e571663cf2e3e8c70d970b1a2fc7660dcb544798..ff59278da2c3d4646261a0d4006133d3d5535c05 100644 (file)
 #endif
 
 
+/* Custom definitions for the bindings of Champlain::MapSourceDesc */
+typedef ChamplainMapSourceDesc ChamplainMapSourceDesc_ornull;
+
+SV* newSVChamplainMapSourceDesc (ChamplainMapSourceDesc *desc);
+ChamplainMapSourceDesc* SvChamplainMapSourceDesc (SV *data);
+
+#define SvChamplainMapSourceDesc_ornull(sv)  (gperl_sv_is_defined (sv) ? SvChamplainMapSourceDesc(sv) : NULL)
+#define newSVChamplainMapSourceDesc_ornull(val)  (((val) == NULL) ? &PL_sv_undef : newSVChamplainMapSourceDesc(val))
+
+
 #include "champlain-autogen.h"
 
 #endif /* _CHAMPLAIN_PERL_H_ */