www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples

Archive Index This month's Index

Subject: Export default functions in the API

Export default functions in the API

From: Sofian Brabez <sofian.brabez_at_wallix.com>
Date: Wed, 27 Jan 2010 12:01:03 +0100

Hi folks,

What do you think replace #define functions by real functions in LIBSSH2_API ?

Let me explain more with libssh2_session_init example below.

Presently we have this definition in include/libssh2.h :

#define libssh2_session_init() libssh2_session_init_ex(NULL, NULL, NULL,
NULL)

Like that libssh2_session_init is not part of LIBSSH2_API and
we can't lookup this symbol because it doesn't exist in shared library:

nm src/.libs/libssh2.so.1|grep session_init
00013e90 T libssh2_session_init_ex

After change with the following diff in attachment, we don't have
the problem anymore:

nm src/.libs/libssh2.so.1 |grep session_init
0001b92a T libssh2_session_init
0001b84f T libssh2_session_init_ex

Do you think it's a good idea to change all #define functions ?

Regards

-- 
Sofian Brabez
Security R&D Engineer
Email: sbz_at_wallix.com
Website: www.wallix.com


_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Received on 2010-01-27

the libssh2 team