ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/plugins/cfperl/cfperl.xs
(Generate patch)

Comparing deliantra/server/plugins/cfperl/cfperl.xs (file contents):
Revision 1.6 by root, Fri Feb 3 21:22:53 2006 UTC vs.
Revision 1.8 by root, Sat Feb 4 00:33:07 2006 UTC

1/*****************************************************************************/ 1/*****************************************************************************/
2/* That code is placed under the GNU General Public Licence (GPL) */
3/* (C)2001-2005 by Chachkoff Yann (Feel free to deliver your complaints) */
4/*****************************************************************************/
5/* CrossFire, A Multiplayer game for X-windows */ 2/* CrossFire, A Multiplayer game for the X Window System */
6/* */
7/* Copyright (C) 2000 Mark Wedel */
8/* Copyright (C) 1992 Frank Tore Johansen */
9/* Copyright (C) 2006 perl plugin by Marc Lehmann <cf@schmorpd.e> */
10/* */
11/* This program is free software; you can redistribute it and/or modify */
12/* it under the terms of the GNU General Public License as published by */
13/* the Free Software Foundation; either version 2 of the License, or */
14/* (at your option) any later version. */
15/* */
16/* This program is distributed in the hope that it will be useful, */
17/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
18/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
19/* GNU General Public License for more details. */
20/* */
21/* You should have received a copy of the GNU General Public License */
22/* along with this program; if not, write to the Free Software */
23/* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
24/* */ 3/* */
25/*****************************************************************************/ 4/*****************************************************************************/
5
6/*
7 * This code is placed under the GNU General Public Licence (GPL)
8 *
9 * Copyright (C) 2001-2005 by Chachkoff Yann
10 * Copyright (C) 2006 by Marc Lehmann <cf@schmorpd.e>
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25*/
26 26
27#include <EXTERN.h> 27#include <EXTERN.h>
28#include <perl.h> 28#include <perl.h>
29#include <XSUB.h> 29#include <XSUB.h>
30 30
128 case CFAPI_DOUBLE: 128 case CFAPI_DOUBLE:
129 sv = newSViv (*va_arg (args, double *)); 129 sv = newSViv (*va_arg (args, double *));
130 break; 130 break;
131 131
132 case CFAPI_STRING: 132 case CFAPI_STRING:
133 sv = newSVpv (va_arg (args, char *), 0); 133 {
134 char *str = va_arg (args, char *);
135 sv = str ? newSVpv (str, 0) : &PL_sv_undef;
136 }
134 break; 137 break;
135 138
136 case CFAPI_POBJECT: 139 case CFAPI_POBJECT:
137 { 140 {
138 object *obj = va_arg (args, object *); 141 object *obj = va_arg (args, object *);
1157 RETVAL = cf_query_base_name (ob, plural); 1160 RETVAL = cf_query_base_name (ob, plural);
1158 OUTPUT: RETVAL 1161 OUTPUT: RETVAL
1159 1162
1160MODULE = cf PACKAGE = cf::object PREFIX = cf_object_ 1163MODULE = cf PACKAGE = cf::object PREFIX = cf_object_
1161 1164
1162object *cf_create_object ()
1163 PROTOTYPE:
1164 ALIAS: new = 0
1165
1166object *cf_create_object_by_name (const char *name) 1165object *cf_create_object_by_name (const char *name = 0)
1167 PROTOTYPE: $ 1166 PROTOTYPE: ;$
1168 ALIAS: new_from_name = 0 1167 ALIAS:
1169 1168 create_object = 0
1170void cf_free_object (object *ob) 1169 new = 0
1170 CODE:
1171 RETVAL = name ? cf_create_object_by_name (name) : cf_create_object ();
1172 OUTPUT:
1173 RETVAL
1171 1174
1172void cf_fix_object (object *pl) 1175void cf_fix_object (object *pl)
1176 ALIAS: fix = 0
1173 1177
1174object *cf_insert_ob_in_ob (object *ob, object *where) 1178object *cf_insert_ob_in_ob (object *ob, object *where)
1175 1179
1176 1180
1177MODULE = cf PACKAGE = cf::object::player PREFIX = cf_player_ 1181MODULE = cf PACKAGE = cf::object::player PREFIX = cf_player_

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines