libpsys

changeset 11:23d4c50616ff

C++ header file compatibility
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 29 Aug 2012 05:10:46 +0300
parents 0f83e882fd04
children 55a2aa4443f7
files src/pattr.h src/psys.h
diffstat 2 files changed, 15 insertions(+), 1 deletions(-) [+]
line diff
     1.1 --- a/src/pattr.h	Wed Aug 29 03:16:58 2012 +0300
     1.2 +++ b/src/pattr.h	Wed Aug 29 05:10:46 2012 +0300
     1.3 @@ -30,6 +30,10 @@
     1.4  	int max_particles;
     1.5  };
     1.6  
     1.7 +#ifdef __cplusplus
     1.8 +extern "C" {
     1.9 +#endif
    1.10 +
    1.11  void psys_texture_loader(unsigned int (*load)(const char*, void*), void (*unload)(unsigned int, void*), void *cls);
    1.12  
    1.13  int psys_init_attr(struct psys_attributes *attr);
    1.14 @@ -43,4 +47,8 @@
    1.15  int psys_save_attr(struct psys_attributes *attr, const char *fname);
    1.16  int psys_save_attr_stream(struct psys_attributes *attr, FILE *fp);
    1.17  
    1.18 +#ifdef __cplusplus
    1.19 +}
    1.20  #endif
    1.21 +
    1.22 +#endif	/* PATTR_H_ */
     2.1 --- a/src/psys.h	Wed Aug 29 03:16:58 2012 +0300
     2.2 +++ b/src/psys.h	Wed Aug 29 05:10:46 2012 +0300
     2.3 @@ -70,7 +70,9 @@
     2.4  	struct psys_particle *next;
     2.5  };
     2.6  
     2.7 -
     2.8 +#ifdef __cplusplus
     2.9 +extern "C" {
    2.10 +#endif
    2.11  
    2.12  struct psys_emitter *psys_create(void);
    2.13  void psys_free(struct psys_emitter *em);
    2.14 @@ -98,4 +100,8 @@
    2.15  void psys_update(struct psys_emitter *em, float tm);
    2.16  void psys_draw(struct psys_emitter *em);
    2.17  
    2.18 +#ifdef __cplusplus
    2.19 +}
    2.20 +#endif
    2.21 +
    2.22  #endif	/* LIBPSYS_H_ */