Skip to content
This repository
Browse code

Forgot to rerun pport.h after XS changes

  • Loading branch information...
commit 7aeecd5d0a9647599d6fb6f21322b52aa1fbee29 1 parent 8d434d9
Kartik Thakore kthakore authored
1  MacOSX/main.c
... ... @@ -1,3 +1,4 @@
  1 +#include "ppport.h"
1 2 #include <EXTERN.h> /* from the Perl distribution */
2 3 #include <perl.h> /* from the Perl distribution */
3 4 #include <SDL.h>
2  src/Core/objects/Surface.xs
... ... @@ -1,8 +1,6 @@
1 1 #include "EXTERN.h"
2 2 #include "perl.h"
3 3 #include "XSUB.h"
4   -#define NEED_newRV_noinc_GLOBAL
5   -#define NEED_newSV_type_GLOBAL
6 4 #include "ppport.h"
7 5 #include "helper.h"
8 6
1  src/Image.xs
... ... @@ -1,7 +1,6 @@
1 1 #include "EXTERN.h"
2 2 #include "perl.h"
3 3 #include "XSUB.h"
4   -#define NEED_sv_2pv_flags_GLOBAL
5 4 #include "ppport.h"
6 5
7 6 #ifndef aTHX_
1  src/Mixer/Channels.xs
... ... @@ -1,7 +1,6 @@
1 1 #include "EXTERN.h"
2 2 #include "perl.h"
3 3 #include "XSUB.h"
4   -#define NEED_sv_2pv_flags
5 4 #include "ppport.h"
6 5
7 6 #ifndef aTHX_
6 src/SDL.xs
@@ -87,10 +87,10 @@ void handler(int sig) {
87 87 void *array[10];
88 88 size_t size;
89 89
90   - //get void*'s for all entries on the stack
  90 + /*get void*'s for all entries on the stack */
91 91 size = backtrace(array, 10);
92 92
93   - // print out all the frames to stderr
  93 + /* print out all the frames to stderr */
94 94 fprintf(stderr, "Error: signal %d:\n", sig);
95 95 backtrace_symbols_fd(array, size, 2);
96 96 exit(1);
@@ -179,7 +179,7 @@ init ( flags )
179 179 #ifndef WIN32
180 180 #ifdef HAVE_TLS_CONTEXT
181 181
182   - Perl_call_atexit(PERL_GET_CONTEXT, (void*)sdl_perl_atexit,0);
  182 + call_atexit(PERL_GET_CONTEXT, (void*)sdl_perl_atexit,0);
183 183 #else
184 184 atexit(sdl_perl_atexit);
185 185 #endif
17 src/SDLx/Controller/Interface.h
... ... @@ -1,23 +1,22 @@
1   -// Defines Controller Interface structs
2   -//
  1 +/* Defines Controller Interface structs */
  2 +/* */
3 3 #include "EXTERN.h"
4 4 #include "perl.h"
5 5 #include "XSUB.h"
6   -#include "ppport.h"
7 6
8 7
9 8 typedef struct SDLx_State
10 9 {
11   - // Position
  10 + /* Position */
12 11 float x;
13 12 float y;
14   - // Velocity
  13 + /* Velocity */
15 14 float v_x;
16 15 float v_y;
17   - // Rotation
  16 + /* Rotation */
18 17 float rotation;
19 18 float ang_v;
20   - // owned by an object or not?
  19 + /* owned by an object or not? */
21 20 int owned;
22 21
23 22 } SDLx_State;
@@ -36,11 +35,11 @@ typedef struct Derivative
36 35 typedef struct SDLx_Interface
37 36 {
38 37
39   - // states to hold
  38 + /* states to hold */
40 39 SDLx_State* previous;
41 40 SDLx_State* current;
42 41
43   - // subs to callback
  42 + /* subs to callback */
44 43 SV* acceleration;
45 44 SV* evaluate;
46 45 SV* interpolate;
10 src/SDLx/Controller/Interface.xs
@@ -26,7 +26,7 @@ AV* acceleration_cb( SDLx_Interface * obj, float t )
26 26 SV * stateref = newSV( sizeof(SDLx_State *) );
27 27 void * copyState = safemalloc( sizeof(SDLx_State) );
28 28 memcpy( copyState, obj->current, sizeof(SDLx_State) );
29   - ((SDLx_State *)copyState)->owned = 0; //conditional free
  29 + ((SDLx_State *)copyState)->owned = 0; /*conditional free */
30 30 ENTER;
31 31 SAVETMPS;
32 32 PUSHMARK(SP);
@@ -44,14 +44,14 @@ AV* acceleration_cb( SDLx_Interface * obj, float t )
44 44 count = call_sv(obj->acceleration, G_ARRAY);
45 45
46 46 SPAGAIN;
47   -// warn( "state %p, state->x %f", copyState, ((SDLx_State *)copyState)->x );
  47 +/* warn( "state %p, state->x %f", copyState, ((SDLx_State *)copyState)->x ); */
48 48 int i;
49 49 for( i =0; i < count ; i++)
50 50 av_push( array, newSVnv(POPn));
51 51
52   -// warn ("before obj->current->x %f", obj->current->x);
  52 +/* warn ("before obj->current->x %f", obj->current->x); */
53 53 copy_state(obj->current, (SDLx_State *)copyState);
54   -// warn ("after obj->current->x %f", obj->current->x);
  54 +/* warn ("after obj->current->x %f", obj->current->x); */
55 55 FREETMPS;
56 56 LEAVE;
57 57
@@ -196,7 +196,7 @@ objx_interpolate(obj, alpha)
196 196 CODE:
197 197 SDLx_State* out = (SDLx_State *)safemalloc(sizeof(SDLx_State )) ;
198 198 interpolate( obj,out, alpha);
199   - out->owned = 0; //condition free
  199 + out->owned = 0; /*condition free */
200 200 RETVAL = out;
201 201 OUTPUT:
202 202 RETVAL
10 src/SDLx/Layer.xs
@@ -41,7 +41,7 @@ layerx_new( CLASS, surface, ... )
41 41 if(SvROK(ST(items - 1)) && SVt_PVHV == SvTYPE(SvRV(ST(items - 1))))
42 42 {
43 43 RETVAL->data = (HV *)SvRV(ST(items - 1));
44   - //if(SvREFCNT(RETVAL->data) < 2)
  44 + /*if(SvREFCNT(RETVAL->data) < 2) */
45 45 SvREFCNT_inc(RETVAL->data);
46 46 items--;
47 47 }
@@ -213,13 +213,13 @@ layerx_foreground( bag )
213 213 CODE:
214 214 SDLx_Layer *layer = (SDLx_Layer *)bag2obj(bag);
215 215 SDLx_LayerManager *manager = layer->manager;
216   - int index = layer->index; // we cant trust its value
  216 + int index = layer->index; /* we cant trust its value */
217 217 layer->manager->saved = 0;
218 218 int i;
219 219
220 220 for(i = 0; i <= av_len(manager->layers); i++)
221 221 {
222   - if(*av_fetch(manager->layers, i, 0) == bag) // what bag do we have? => finding the right layer index
  222 + if(*av_fetch(manager->layers, i, 0) == bag) /* what bag do we have? => finding the right layer index */
223 223 {
224 224 index = i;
225 225 break;
@@ -241,6 +241,6 @@ void
241 241 layerx_DESTROY( layer )
242 242 SDLx_Layer *layer
243 243 CODE:
244   - //if((HV *)NULL != layer->data) // Attempt to free unreferenced scalar
245   - //SvREFCNT_dec(layer->data);
  244 + /*if((HV *)NULL != layer->data) // Attempt to free unreferenced scalar */
  245 + /*SvREFCNT_dec(layer->data); */
246 246 safefree(layer);
13 src/SDLx/LayerManager.h
... ... @@ -1,3 +1,4 @@
  1 +#include "ppport.h"
1 2
2 3 #include "helper.h"
3 4
@@ -26,26 +27,26 @@ typedef struct SDLx_Layer
26 27 int intersection( SDLx_Layer *layer1, SDLx_Layer *layer2 )
27 28 {
28 29 if(
29   - // upper left point inside layer
  30 + /* upper left point inside layer */
30 31 ( layer1->pos->x <= layer2->pos->x
31 32 && layer2->pos->x < layer1->pos->x + layer1->clip->w
32 33 && layer1->pos->y <= layer2->pos->y
33 34 && layer2->pos->y < layer1->pos->y + layer1->clip->h
34 35 )
35 36
36   - // upper right point inside layer
  37 + /* upper right point inside layer */
37 38 || ( layer1->pos->x < layer2->pos->x + layer2->clip->w
38 39 && layer2->pos->x + layer2->clip->w <= layer1->pos->x + layer1->clip->w
39 40 && layer1->pos->y <= layer2->pos->y
40 41 && layer2->pos->y < layer1->pos->y + layer1->clip->h )
41 42
42   - // lower left point inside layer
  43 + /* lower left point inside layer */
43 44 || ( layer1->pos->x <= layer2->pos->x
44 45 && layer2->pos->x < layer1->pos->x + layer1->clip->w
45 46 && layer1->pos->y < layer2->pos->y + layer2->clip->h
46 47 && layer2->pos->y + layer2->clip->h <= layer1->pos->y + layer1->clip->h )
47 48
48   - // lower right point inside layer
  49 + /* lower right point inside layer */
49 50 || ( layer1->pos->x < layer2->pos->x + layer2->clip->w
50 51 && layer2->pos->x + layer2->clip->w <= layer1->pos->x + layer1->clip->w
51 52 && layer1->pos->y < layer2->pos->y + layer2->clip->h
@@ -69,7 +70,7 @@ AV *layers_behind( SDLx_Layer *layer)
69 70 SDLx_Layer *layer2 = (SDLx_Layer *)bag2obj(bag);
70 71 if(intersection( layer, layer2 ) || intersection( layer2, layer ))
71 72 {
72   - // TODO checking transparency
  73 + /* TODO checking transparency */
73 74 SvREFCNT_inc(bag);
74 75 av_store( matches, count, bag );
75 76 count++;
@@ -104,7 +105,7 @@ AV *layers_ahead( SDLx_Layer *layer )
104 105 SDLx_Layer *layer2 = (SDLx_Layer *)bag2obj(bag);
105 106 if(intersection( layer, layer2 ) || intersection( layer2, layer ))
106 107 {
107   - // TODO checking transparency
  108 + /* TODO checking transparency */
108 109 SvREFCNT_inc(bag);
109 110 av_store( matches, count, bag );
110 111 count++;
4 src/SDLx/LayerManager.xs
@@ -339,14 +339,14 @@ lmx_foreground( manager, ... )
339 339 {
340 340 SDLx_Layer *layer = (SDLx_Layer *)bag2obj(ST(x));
341 341 SDLx_LayerManager *manager = layer->manager;
342   - int index = layer->index; // we cant trust its value
  342 + int index = layer->index; /* we cant trust its value */
343 343 int i;
344 344
345 345 SV *fetched;
346 346 for(i = 0; i <= av_len(manager->layers); i++)
347 347 {
348 348 fetched = *av_fetch(manager->layers, i, 0);
349   - if(fetched == ST(x)) // what bag do we have? => finding the right layer index
  349 + if(fetched == ST(x)) /* what bag do we have? => finding the right layer index */
350 350 {
351 351 index = i;
352 352 break;
2  src/SDLx/Surface.xs
@@ -191,7 +191,7 @@ surfacex_draw_rect ( surface, rt, color )
191 191 r_rect.y = v_rect->y;
192 192 r_rect.w = v_rect->w;
193 193 r_rect.h = v_rect->h;
194   -// if( newly_created_rect == 1 ) { safefree( v_rect); }
  194 +/* if( newly_created_rect == 1 ) { safefree( v_rect); } */
195 195 }
196 196 SDL_FillRect(surface, &r_rect, m_color);
197 197
3  src/SDLx/Validate.h
... ... @@ -1,10 +1,11 @@
  1 +#include "ppport.h"
1 2 #include <SDL.h>
2 3 #include "helper.h"
3 4
4 5 SV *rect( SV *rect, int* new_rect_made)
5 6 {
6 7 SV *retval = NULL;
7   - //we hand this over to perl to handle
  8 + /*we hand this over to perl to handle */
8 9
9 10 if( !SvOK(rect) )
10 11 {
2  src/defines.h
... ... @@ -1,3 +1,5 @@
  1 +#define NEED_eval_pv
  2 +#include "ppport.h"
1 3 /* */
2 4 /* defines.h */
3 5 /* */

0 comments on commit 7aeecd5

Please sign in to comment.
Something went wrong with that request. Please try again.