Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Forgot to rerun pport.h after XS changes

  • Loading branch information...
commit 7aeecd5d0a9647599d6fb6f21322b52aa1fbee29 1 parent 8d434d9
@kthakore kthakore authored
View
1  MacOSX/main.c
@@ -1,3 +1,4 @@
+#include "ppport.h"
#include <EXTERN.h> /* from the Perl distribution */
#include <perl.h> /* from the Perl distribution */
#include <SDL.h>
View
2  src/Core/objects/Surface.xs
@@ -1,8 +1,6 @@
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
-#define NEED_newRV_noinc_GLOBAL
-#define NEED_newSV_type_GLOBAL
#include "ppport.h"
#include "helper.h"
View
1  src/Image.xs
@@ -1,7 +1,6 @@
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
-#define NEED_sv_2pv_flags_GLOBAL
#include "ppport.h"
#ifndef aTHX_
View
1  src/Mixer/Channels.xs
@@ -1,7 +1,6 @@
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
-#define NEED_sv_2pv_flags
#include "ppport.h"
#ifndef aTHX_
View
6 src/SDL.xs
@@ -87,10 +87,10 @@ void handler(int sig) {
void *array[10];
size_t size;
- //get void*'s for all entries on the stack
+ /*get void*'s for all entries on the stack */
size = backtrace(array, 10);
- // print out all the frames to stderr
+ /* print out all the frames to stderr */
fprintf(stderr, "Error: signal %d:\n", sig);
backtrace_symbols_fd(array, size, 2);
exit(1);
@@ -179,7 +179,7 @@ init ( flags )
#ifndef WIN32
#ifdef HAVE_TLS_CONTEXT
- Perl_call_atexit(PERL_GET_CONTEXT, (void*)sdl_perl_atexit,0);
+ call_atexit(PERL_GET_CONTEXT, (void*)sdl_perl_atexit,0);
#else
atexit(sdl_perl_atexit);
#endif
View
17 src/SDLx/Controller/Interface.h
@@ -1,23 +1,22 @@
-// Defines Controller Interface structs
-//
+/* Defines Controller Interface structs */
+/* */
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
-#include "ppport.h"
typedef struct SDLx_State
{
- // Position
+ /* Position */
float x;
float y;
- // Velocity
+ /* Velocity */
float v_x;
float v_y;
- // Rotation
+ /* Rotation */
float rotation;
float ang_v;
- // owned by an object or not?
+ /* owned by an object or not? */
int owned;
} SDLx_State;
@@ -36,11 +35,11 @@ typedef struct Derivative
typedef struct SDLx_Interface
{
- // states to hold
+ /* states to hold */
SDLx_State* previous;
SDLx_State* current;
- // subs to callback
+ /* subs to callback */
SV* acceleration;
SV* evaluate;
SV* interpolate;
View
10 src/SDLx/Controller/Interface.xs
@@ -26,7 +26,7 @@ AV* acceleration_cb( SDLx_Interface * obj, float t )
SV * stateref = newSV( sizeof(SDLx_State *) );
void * copyState = safemalloc( sizeof(SDLx_State) );
memcpy( copyState, obj->current, sizeof(SDLx_State) );
- ((SDLx_State *)copyState)->owned = 0; //conditional free
+ ((SDLx_State *)copyState)->owned = 0; /*conditional free */
ENTER;
SAVETMPS;
PUSHMARK(SP);
@@ -44,14 +44,14 @@ AV* acceleration_cb( SDLx_Interface * obj, float t )
count = call_sv(obj->acceleration, G_ARRAY);
SPAGAIN;
-// warn( "state %p, state->x %f", copyState, ((SDLx_State *)copyState)->x );
+/* warn( "state %p, state->x %f", copyState, ((SDLx_State *)copyState)->x ); */
int i;
for( i =0; i < count ; i++)
av_push( array, newSVnv(POPn));
-// warn ("before obj->current->x %f", obj->current->x);
+/* warn ("before obj->current->x %f", obj->current->x); */
copy_state(obj->current, (SDLx_State *)copyState);
-// warn ("after obj->current->x %f", obj->current->x);
+/* warn ("after obj->current->x %f", obj->current->x); */
FREETMPS;
LEAVE;
@@ -196,7 +196,7 @@ objx_interpolate(obj, alpha)
CODE:
SDLx_State* out = (SDLx_State *)safemalloc(sizeof(SDLx_State )) ;
interpolate( obj,out, alpha);
- out->owned = 0; //condition free
+ out->owned = 0; /*condition free */
RETVAL = out;
OUTPUT:
RETVAL
View
10 src/SDLx/Layer.xs
@@ -41,7 +41,7 @@ layerx_new( CLASS, surface, ... )
if(SvROK(ST(items - 1)) && SVt_PVHV == SvTYPE(SvRV(ST(items - 1))))
{
RETVAL->data = (HV *)SvRV(ST(items - 1));
- //if(SvREFCNT(RETVAL->data) < 2)
+ /*if(SvREFCNT(RETVAL->data) < 2) */
SvREFCNT_inc(RETVAL->data);
items--;
}
@@ -213,13 +213,13 @@ layerx_foreground( bag )
CODE:
SDLx_Layer *layer = (SDLx_Layer *)bag2obj(bag);
SDLx_LayerManager *manager = layer->manager;
- int index = layer->index; // we cant trust its value
+ int index = layer->index; /* we cant trust its value */
layer->manager->saved = 0;
int i;
for(i = 0; i <= av_len(manager->layers); i++)
{
- if(*av_fetch(manager->layers, i, 0) == bag) // what bag do we have? => finding the right layer index
+ if(*av_fetch(manager->layers, i, 0) == bag) /* what bag do we have? => finding the right layer index */
{
index = i;
break;
@@ -241,6 +241,6 @@ void
layerx_DESTROY( layer )
SDLx_Layer *layer
CODE:
- //if((HV *)NULL != layer->data) // Attempt to free unreferenced scalar
- //SvREFCNT_dec(layer->data);
+ /*if((HV *)NULL != layer->data) // Attempt to free unreferenced scalar */
+ /*SvREFCNT_dec(layer->data); */
safefree(layer);
View
13 src/SDLx/LayerManager.h
@@ -1,3 +1,4 @@
+#include "ppport.h"
#include "helper.h"
@@ -26,26 +27,26 @@ typedef struct SDLx_Layer
int intersection( SDLx_Layer *layer1, SDLx_Layer *layer2 )
{
if(
- // upper left point inside layer
+ /* upper left point inside layer */
( layer1->pos->x <= layer2->pos->x
&& layer2->pos->x < layer1->pos->x + layer1->clip->w
&& layer1->pos->y <= layer2->pos->y
&& layer2->pos->y < layer1->pos->y + layer1->clip->h
)
- // upper right point inside layer
+ /* upper right point inside layer */
|| ( layer1->pos->x < layer2->pos->x + layer2->clip->w
&& layer2->pos->x + layer2->clip->w <= layer1->pos->x + layer1->clip->w
&& layer1->pos->y <= layer2->pos->y
&& layer2->pos->y < layer1->pos->y + layer1->clip->h )
- // lower left point inside layer
+ /* lower left point inside layer */
|| ( layer1->pos->x <= layer2->pos->x
&& layer2->pos->x < layer1->pos->x + layer1->clip->w
&& layer1->pos->y < layer2->pos->y + layer2->clip->h
&& layer2->pos->y + layer2->clip->h <= layer1->pos->y + layer1->clip->h )
- // lower right point inside layer
+ /* lower right point inside layer */
|| ( layer1->pos->x < layer2->pos->x + layer2->clip->w
&& layer2->pos->x + layer2->clip->w <= layer1->pos->x + layer1->clip->w
&& layer1->pos->y < layer2->pos->y + layer2->clip->h
@@ -69,7 +70,7 @@ AV *layers_behind( SDLx_Layer *layer)
SDLx_Layer *layer2 = (SDLx_Layer *)bag2obj(bag);
if(intersection( layer, layer2 ) || intersection( layer2, layer ))
{
- // TODO checking transparency
+ /* TODO checking transparency */
SvREFCNT_inc(bag);
av_store( matches, count, bag );
count++;
@@ -104,7 +105,7 @@ AV *layers_ahead( SDLx_Layer *layer )
SDLx_Layer *layer2 = (SDLx_Layer *)bag2obj(bag);
if(intersection( layer, layer2 ) || intersection( layer2, layer ))
{
- // TODO checking transparency
+ /* TODO checking transparency */
SvREFCNT_inc(bag);
av_store( matches, count, bag );
count++;
View
4 src/SDLx/LayerManager.xs
@@ -339,14 +339,14 @@ lmx_foreground( manager, ... )
{
SDLx_Layer *layer = (SDLx_Layer *)bag2obj(ST(x));
SDLx_LayerManager *manager = layer->manager;
- int index = layer->index; // we cant trust its value
+ int index = layer->index; /* we cant trust its value */
int i;
SV *fetched;
for(i = 0; i <= av_len(manager->layers); i++)
{
fetched = *av_fetch(manager->layers, i, 0);
- if(fetched == ST(x)) // what bag do we have? => finding the right layer index
+ if(fetched == ST(x)) /* what bag do we have? => finding the right layer index */
{
index = i;
break;
View
2  src/SDLx/Surface.xs
@@ -191,7 +191,7 @@ surfacex_draw_rect ( surface, rt, color )
r_rect.y = v_rect->y;
r_rect.w = v_rect->w;
r_rect.h = v_rect->h;
-// if( newly_created_rect == 1 ) { safefree( v_rect); }
+/* if( newly_created_rect == 1 ) { safefree( v_rect); } */
}
SDL_FillRect(surface, &r_rect, m_color);
View
3  src/SDLx/Validate.h
@@ -1,10 +1,11 @@
+#include "ppport.h"
#include <SDL.h>
#include "helper.h"
SV *rect( SV *rect, int* new_rect_made)
{
SV *retval = NULL;
- //we hand this over to perl to handle
+ /*we hand this over to perl to handle */
if( !SvOK(rect) )
{
View
2  src/defines.h
@@ -1,3 +1,5 @@
+#define NEED_eval_pv
+#include "ppport.h"
/* */
/* defines.h */
/* */
Please sign in to comment.
Something went wrong with that request. Please try again.