Skip to content

Commit

Permalink
make c compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
jgillis committed Jul 28, 2024
1 parent 4e6f93c commit d2be650
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ runs:
using: "composite"
steps:
- run: |
curl -OL https://github.com/casadi/mockups/releases/download/v79/mockups_${{ inputs.tag }}_Release.zip
curl -OL https://github.com/casadi/mockups/releases/download/v80/mockups_${{ inputs.tag }}_Release.zip
unzip mockups_${{ inputs.tag }}_Release.zip -d mockups
ls mockups
ls mockups/cmake
Expand Down
8 changes: 6 additions & 2 deletions matlab/include/engine.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#ifndef engine_H
#define engine_H

extern "C"
{
#ifdef __cplusplus
extern "C" {
#endif

typedef struct mxArray_tag mxArray;
typedef struct engine Engine;

Expand All @@ -14,6 +16,8 @@ extern "C"
int engPutVariable(Engine *, const char *, const mxArray *);
int engOutputBuffer(Engine *, char *, int);

#ifdef __cplusplus
}
#endif

#endif // engine_H
8 changes: 6 additions & 2 deletions matlab/include/mex.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
#define mex_H


extern "C"
{
#ifdef __cplusplus
extern "C" {
#endif

typedef struct mxArray_tag mxArray;


Expand All @@ -22,6 +24,8 @@ void mexLock(void);
int mexAtExit(void (*)(void));
void mexMakeArrayPersistent(mxArray *);

#ifdef __cplusplus
}
#endif

#endif // mex_H

0 comments on commit d2be650

Please sign in to comment.