Skip to content

Commit

Permalink
Add extern to global vars (#53)
Browse files Browse the repository at this point in the history
Signed-off-by: Darby Johnston <[email protected]>
  • Loading branch information
darbyjohnston authored Mar 31, 2023
1 parent 72bdee3 commit 58ed923
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
28 changes: 17 additions & 11 deletions include/copentimelineio/marker.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,27 @@

#ifdef __cplusplus
# define OTIO_API extern "C"
# define OTIO_API_BEGIN OTIO_API {
# define OTIO_API_END }
#else
# define OTIO_API
# define OTIO_API_BEGIN
# define OTIO_API_END
#endif

OTIO_API const char *MarkerColor_pink;
OTIO_API const char *MarkerColor_red;
OTIO_API const char *MarkerColor_orange;
OTIO_API const char *MarkerColor_yellow;
OTIO_API const char *MarkerColor_green;
OTIO_API const char *MarkerColor_cyan;
OTIO_API const char *MarkerColor_blue;
OTIO_API const char *MarkerColor_purple;
OTIO_API const char *MarkerColor_magenta;
OTIO_API const char *MarkerColor_black;
OTIO_API const char *MarkerColor_white;
OTIO_API_BEGIN
extern const char *MarkerColor_pink;
extern const char *MarkerColor_red;
extern const char *MarkerColor_orange;
extern const char *MarkerColor_yellow;
extern const char *MarkerColor_green;
extern const char *MarkerColor_cyan;
extern const char *MarkerColor_blue;
extern const char *MarkerColor_purple;
extern const char *MarkerColor_magenta;
extern const char *MarkerColor_black;
extern const char *MarkerColor_white;
OTIO_API_END
typedef struct RetainerMarker RetainerMarker;
typedef struct Marker Marker;

Expand Down
10 changes: 8 additions & 2 deletions include/copentimelineio/track.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@

#ifdef __cplusplus
# define OTIO_API extern "C"
# define OTIO_API_BEGIN OTIO_API {
# define OTIO_API_END }
#else
# define OTIO_API
# define OTIO_API_BEGIN
# define OTIO_API_END
#endif

typedef struct Track Track;
Expand All @@ -31,8 +35,10 @@ typedef enum {
} OTIO_Track_NeighbourGapPolicy_;
typedef int OTIO_Track_NeighbourGapPolicy;

OTIO_API const char *TrackKind_Video;
OTIO_API const char *TrackKind_Audio;
OTIO_API_BEGIN
extern const char *TrackKind_Video;
extern const char *TrackKind_Audio;
OTIO_API_END

OTIO_API Track *Track_create(
const char *name,
Expand Down

0 comments on commit 58ed923

Please sign in to comment.