########################### -*- Mode: Fundamental -*- #########################
## $Basename: typemap $
## $Revision: 1.8 $
## Author          : Ulrich Pfeifer
## Created On      : Sat Dec 20 19:20:45 1997
## Last Modified By: Ulrich Pfeifer
## Last Modified On: Sun Dec 21 13:31:14 1997
## Language        : N/A
## Update Count    : 7
## Status          : Unknown, Use with caution!
## 
## (C) Copyright 1997, Ulrich Pfeifer, all rights reserved.
## 
###############################################################################

MLINK                                           O_OBJECT
mlapi_result                                    T_IV
mlapi_token                                     T_IV
mlapi_packet                                    T_IV
kcharp_ct                                       T_PV
int_nt                                          T_IV
double_nt                                       T_NV
long_st                                         T_IV
SYMBOL                                          O_OBJECT

# The following is Stolen from Dean Roehrichs CookBookA
OUTPUT

        # The Perl object is blessed into 'CLASS', which should be a
        # char* having the name of the package for the blessing.
O_OBJECT
	sv_setref_pv( $arg, CLASS, (void*)$var );

INPUT

O_OBJECT
	if (sv_isobject($arg) && (SvTYPE(SvRV($arg)) == SVt_PVMG)) {
	    $var = ($type)SvIV((SV*)SvRV( $arg ));
	} else {
            warn( \"${Package}::$func_name() -- $var is not a blessed SV reference\" );
            XSRETURN_UNDEF;
        }

