path: Fixed ErrPath error.

This commit is contained in:
Jose Marcial Vieira Bisneto 2016-11-29 20:34:59 -03:00
parent d6e92026a2
commit d761e6062b
2 changed files with 15 additions and 10 deletions

View file

@ -1,6 +1,7 @@
#ifndef IPFS_PATH_H #ifndef IPFS_PATH_H
#define IPFS_PATH_H #define IPFS_PATH_H
#ifdef IPFS_PATH_C
char *ErrPath[] = { char *ErrPath[] = {
NULL, NULL,
// ErrBadPath is returned when a given path is incorrectly formatted // ErrBadPath is returned when a given path is incorrectly formatted
@ -11,6 +12,9 @@
NULL, NULL,
"no link named %s under %s" "no link named %s under %s"
}; };
#else
extern char **ErrPath;
#endif // IPFS_PATH_C
enum { enum {
ErrBadPath = 1, ErrBadPath = 1,

View file

@ -1,6 +1,7 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <ipfs/cid/cid.h> #include <ipfs/cid/cid.h>
#define IPFS_PATH_C
#include <ipfs/path/path.h> #include <ipfs/path/path.h>
// FromCid safely converts a cid.Cid type to a Path type // FromCid safely converts a cid.Cid type to a Path type