Skip to content

Commit

Permalink
Merge pull request taosdata#9824 from Yurunsoft/dll-export
Browse files Browse the repository at this point in the history
Added DLL_EXPORT declaration for tstrerror(), taosGetErrno(), taos_data_type()
  • Loading branch information
guanshengliang authored Oct 24, 2022
2 parents 959c27c + bd0cb64 commit 4e0469e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/inc/taos.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ DLL_EXPORT TAOS *taos_connect(const char *ip, const char *user, const char *pass
DLL_EXPORT TAOS *taos_connect_auth(const char *ip, const char *user, const char *auth, const char *db, uint16_t port);
DLL_EXPORT void taos_close(TAOS *taos);

const char *taos_data_type(int type);
DLL_EXPORT const char *taos_data_type(int type);

typedef struct TAOS_BIND {
int buffer_type;
Expand Down
10 changes: 8 additions & 2 deletions src/inc/taoserror.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,15 @@ extern "C" {
#define TAOS_SUCCEEDED(err) ((err) >= 0)
#define TAOS_FAILED(err) ((err) < 0)

const char* tstrerror(int32_t err);
#ifdef _TD_GO_DLL_
#define DLL_EXPORT __declspec(dllexport)
#else
#define DLL_EXPORT
#endif

DLL_EXPORT const char* tstrerror(int32_t err);

int32_t* taosGetErrno();
DLL_EXPORT int32_t* taosGetErrno();
#define terrno (*taosGetErrno())

#define TSDB_CODE_SUCCESS 0
Expand Down

0 comments on commit 4e0469e

Please sign in to comment.