Skip to content

Commit

Permalink
Some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rlabrecque committed Oct 10, 2013
1 parent 4bdbd46 commit 4ab0417
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
18 changes: 10 additions & 8 deletions CSteamworks.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
#include "steam_gameserver.h" // Includes steam_api internally
#ifdef _WIN32
# define SB_API extern "C" __declspec( dllexport )
#if defined( _WIN32 )
#define SB_API extern "C" __declspec( dllexport )
#elif defined( GNUC )
#define SB_API extern "C" __attribute__ ((visibility ("default")))
#else
# define SB_API extern "C"
#define SB_API extern "C"
#endif
"""[1:]

Expand Down Expand Up @@ -110,7 +112,7 @@
continue

if state == 0: # Return Value
if token[0] == '*':
if token.startswith('*'):
returnvalue += '*'
state = 1
elif token.find('(') == -1:
Expand All @@ -119,7 +121,7 @@
state = 1

if state == 1: # Method Name
if token[0] == '*':
if token.startswith('*'):
token = token[1:]
realmethodname = token.split('(', 1)[0]
methodname = iface + '_' + realmethodname
Expand All @@ -138,7 +140,7 @@
continue

if state == 2: # Args
if token[0] == ')':
if token.startswith(')'):
state = 3
elif token.endswith(')'): # Edge case in SetGameData and GetAvailableVoice
args += token[:-1]
Expand All @@ -163,9 +165,9 @@
if token == '0': # Like f( nChannel = 0 )
token = argssplitted[i - 2]

if token[1] == '*':
if token.startswith('**'):
typelessargs += token[2:] + ' '
elif token[0] == '*':
elif token.startswith('*'):
typelessargs += token[1:] + ' '
elif token[-1] == ',':
typelessargs += token + ' '
Expand Down
8 changes: 5 additions & 3 deletions src/steam_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
#include "steam_gameserver.h"
#include "steamencryptedappticket.h"

#ifdef _WIN32
# define SB_API extern "C" __declspec( dllexport )
#if defined( _WIN32 )
#define SB_API extern "C" __declspec( dllexport )
#elif defined( GNUC )
#define SB_API extern "C" __attribute__ ((visibility ("default")))
#else
# define SB_API extern "C"
#define SB_API extern "C"
#endif

/**********************************************************
Expand Down

0 comments on commit 4ab0417

Please sign in to comment.