Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Dlang
gtkd
Commits
7c49a3b2
Commit
7c49a3b2
authored
Sep 29, 2020
by
Mike Wey
Browse files
Fix? deprecation warnings with dmd 2.094
parent
0cb19e56
Changes
2
Hide whitespace changes
Inline
Side-by-side
generated/gtkd/gtkd/Loader.d
View file @
7c49a3b2
...
...
@@ -35,19 +35,6 @@ public struct Linker
throw
new
Error
(
"The function you are calling is not pressent in your version of GTK+."
);
}
/*
* Links the provided symbol
* Params:
* funct = The function we are linking
* symbol = The name of the symbol to link
* libraries = One or more libraries to search for the symbol
*/
deprecated
(
"Use the LIBRARY_* symbols defined for each package, instead of gtkd.paths.LIBRARY"
)
public
static
void
link
(
T
)(
ref
T
funct
,
string
symbol
,
LIBRARY
[]
libraries
...)
{
funct
=
cast
(
T
)
getSymbol
(
symbol
,
libraries
);
}
/*
* Links the provided symbol
* Params:
...
...
@@ -60,25 +47,6 @@ public struct Linker
funct
=
cast
(
T
)
getSymbol
(
symbol
,
libraries
);
}
/*
* Gets a simbol from one of the provided libraries
* Params:
* symbol = The name of the symbol to link
* libraries = One or more libraries to search for the symbol
*/
deprecated
(
"Use the LIBRARY_* symbols defined for each package, instead of gtkd.paths.LIBRARY"
)
public
static
void
*
getSymbol
(
string
symbol
,
LIBRARY
[]
libraries
...)
{
string
[]
libStr
=
new
string
[
libraries
.
length
];
foreach
(
i
,
library
;
libraries
)
{
libStr
[
i
]
=
importLibs
[
library
];
}
return
getSymbol
(
symbol
,
libStr
);
}
/*
* Gets a simbol from one of the provided libraries
* Params:
...
...
@@ -138,15 +106,6 @@ public struct Linker
loadedLibraries
[
library
]
=
handle
;
}
/*
* Unload a library
*/
deprecated
(
"Use the LIBRARY_* symbols defined for each package, instead of gtkd.paths.LIBRARY"
)
public
static
void
unloadLibrary
(
LIBRARY
library
)
{
unloadLibrary
(
importLibs
[
library
]
);
}
/*
* Unload a library
*/
...
...
@@ -195,16 +154,6 @@ public struct Linker
}
}
/**
* Checks if a library is loaded.
* Returns: true is the library was loaded sucsessfully.
*/
deprecated
(
"Use the LIBRARY_* symbols defined for each package, instead of gtkd.paths.LIBRARY"
)
public
static
bool
isLoaded
(
LIBRARY
library
)
{
return
isLoaded
(
importLibs
[
library
]);
}
/**
* Checks if a library is loaded.
* Returns: true is the library was loaded sucsessfully.
...
...
@@ -223,17 +172,6 @@ public struct Linker
return
isLoaded
(
libraries
[
0
]);
}
/**
* Gets all the failed loads for a specific library.
* returns: An array of the names hat failed to load for a specific library
* or null if none was found
*/
deprecated
(
"Use the LIBRARY_* symbols defined for each package, instead of gtkd.paths.LIBRARY"
)
public
static
string
[]
getLoadFailures
(
LIBRARY
library
)
{
return
getLoadFailures
(
importLibs
[
library
]);
}
/**
* Gets all the failed loads for a specific library.
* returns: An array of the names hat failed to load for a specific library
...
...
@@ -279,6 +217,68 @@ public struct Linker
foreach
(
library
;
loadedLibraries
.
keys
)
unloadLibrary
(
library
);
}
/*
* Links the provided symbol
* Params:
* funct = The function we are linking
* symbol = The name of the symbol to link
* libraries = One or more libraries to search for the symbol
*/
deprecated
(
"Use the LIBRARY_* symbols defined for each package, instead of gtkd.paths.LIBRARY"
)
public
static
void
link
(
T
)(
ref
T
funct
,
string
symbol
,
LIBRARY
[]
libraries
...)
{
funct
=
cast
(
T
)
getSymbol
(
symbol
,
libraries
);
}
/*
* Gets a simbol from one of the provided libraries
* Params:
* symbol = The name of the symbol to link
* libraries = One or more libraries to search for the symbol
*/
deprecated
(
"Use the LIBRARY_* symbols defined for each package, instead of gtkd.paths.LIBRARY"
)
public
static
void
*
getSymbol
(
string
symbol
,
LIBRARY
[]
libraries
...)
{
string
[]
libStr
=
new
string
[
libraries
.
length
];
foreach
(
i
,
library
;
libraries
)
{
libStr
[
i
]
=
importLibs
[
library
];
}
return
getSymbol
(
symbol
,
libStr
);
}
/*
* Unload a library
*/
deprecated
(
"Use the LIBRARY_* symbols defined for each package, instead of gtkd.paths.LIBRARY"
)
public
static
void
unloadLibrary
(
LIBRARY
library
)
{
unloadLibrary
(
importLibs
[
library
]
);
}
/**
* Checks if a library is loaded.
* Returns: true is the library was loaded sucsessfully.
*/
deprecated
(
"Use the LIBRARY_* symbols defined for each package, instead of gtkd.paths.LIBRARY"
)
public
static
bool
isLoaded
(
LIBRARY
library
)
{
return
isLoaded
(
importLibs
[
library
]);
}
/**
* Gets all the failed loads for a specific library.
* returns: An array of the names hat failed to load for a specific library
* or null if none was found
*/
deprecated
(
"Use the LIBRARY_* symbols defined for each package, instead of gtkd.paths.LIBRARY"
)
public
static
string
[]
getLoadFailures
(
LIBRARY
library
)
{
return
getLoadFailures
(
importLibs
[
library
]);
}
}
// Platform specific implementation below.
...
...
src/gtkd/Loader.d
View file @
7c49a3b2
...
...
@@ -35,19 +35,6 @@ public struct Linker
throw
new
Error
(
"The function you are calling is not pressent in your version of GTK+."
);
}
/*
* Links the provided symbol
* Params:
* funct = The function we are linking
* symbol = The name of the symbol to link
* libraries = One or more libraries to search for the symbol
*/
deprecated
(
"Use the LIBRARY_* symbols defined for each package, instead of gtkd.paths.LIBRARY"
)
public
static
void
link
(
T
)(
ref
T
funct
,
string
symbol
,
LIBRARY
[]
libraries
...)
{
funct
=
cast
(
T
)
getSymbol
(
symbol
,
libraries
);
}
/*
* Links the provided symbol
* Params:
...
...
@@ -60,25 +47,6 @@ public struct Linker
funct
=
cast
(
T
)
getSymbol
(
symbol
,
libraries
);
}
/*
* Gets a simbol from one of the provided libraries
* Params:
* symbol = The name of the symbol to link
* libraries = One or more libraries to search for the symbol
*/
deprecated
(
"Use the LIBRARY_* symbols defined for each package, instead of gtkd.paths.LIBRARY"
)
public
static
void
*
getSymbol
(
string
symbol
,
LIBRARY
[]
libraries
...)
{
string
[]
libStr
=
new
string
[
libraries
.
length
];
foreach
(
i
,
library
;
libraries
)
{
libStr
[
i
]
=
importLibs
[
library
];
}
return
getSymbol
(
symbol
,
libStr
);
}
/*
* Gets a simbol from one of the provided libraries
* Params:
...
...
@@ -138,15 +106,6 @@ public struct Linker
loadedLibraries
[
library
]
=
handle
;
}
/*
* Unload a library
*/
deprecated
(
"Use the LIBRARY_* symbols defined for each package, instead of gtkd.paths.LIBRARY"
)
public
static
void
unloadLibrary
(
LIBRARY
library
)
{
unloadLibrary
(
importLibs
[
library
]
);
}
/*
* Unload a library
*/
...
...
@@ -195,16 +154,6 @@ public struct Linker
}
}
/**
* Checks if a library is loaded.
* Returns: true is the library was loaded sucsessfully.
*/
deprecated
(
"Use the LIBRARY_* symbols defined for each package, instead of gtkd.paths.LIBRARY"
)
public
static
bool
isLoaded
(
LIBRARY
library
)
{
return
isLoaded
(
importLibs
[
library
]);
}
/**
* Checks if a library is loaded.
* Returns: true is the library was loaded sucsessfully.
...
...
@@ -223,17 +172,6 @@ public struct Linker
return
isLoaded
(
libraries
[
0
]);
}
/**
* Gets all the failed loads for a specific library.
* returns: An array of the names hat failed to load for a specific library
* or null if none was found
*/
deprecated
(
"Use the LIBRARY_* symbols defined for each package, instead of gtkd.paths.LIBRARY"
)
public
static
string
[]
getLoadFailures
(
LIBRARY
library
)
{
return
getLoadFailures
(
importLibs
[
library
]);
}
/**
* Gets all the failed loads for a specific library.
* returns: An array of the names hat failed to load for a specific library
...
...
@@ -279,6 +217,68 @@ public struct Linker
foreach
(
library
;
loadedLibraries
.
keys
)
unloadLibrary
(
library
);
}
/*
* Links the provided symbol
* Params:
* funct = The function we are linking
* symbol = The name of the symbol to link
* libraries = One or more libraries to search for the symbol
*/
deprecated
(
"Use the LIBRARY_* symbols defined for each package, instead of gtkd.paths.LIBRARY"
)
public
static
void
link
(
T
)(
ref
T
funct
,
string
symbol
,
LIBRARY
[]
libraries
...)
{
funct
=
cast
(
T
)
getSymbol
(
symbol
,
libraries
);
}
/*
* Gets a simbol from one of the provided libraries
* Params:
* symbol = The name of the symbol to link
* libraries = One or more libraries to search for the symbol
*/
deprecated
(
"Use the LIBRARY_* symbols defined for each package, instead of gtkd.paths.LIBRARY"
)
public
static
void
*
getSymbol
(
string
symbol
,
LIBRARY
[]
libraries
...)
{
string
[]
libStr
=
new
string
[
libraries
.
length
];
foreach
(
i
,
library
;
libraries
)
{
libStr
[
i
]
=
importLibs
[
library
];
}
return
getSymbol
(
symbol
,
libStr
);
}
/*
* Unload a library
*/
deprecated
(
"Use the LIBRARY_* symbols defined for each package, instead of gtkd.paths.LIBRARY"
)
public
static
void
unloadLibrary
(
LIBRARY
library
)
{
unloadLibrary
(
importLibs
[
library
]
);
}
/**
* Checks if a library is loaded.
* Returns: true is the library was loaded sucsessfully.
*/
deprecated
(
"Use the LIBRARY_* symbols defined for each package, instead of gtkd.paths.LIBRARY"
)
public
static
bool
isLoaded
(
LIBRARY
library
)
{
return
isLoaded
(
importLibs
[
library
]);
}
/**
* Gets all the failed loads for a specific library.
* returns: An array of the names hat failed to load for a specific library
* or null if none was found
*/
deprecated
(
"Use the LIBRARY_* symbols defined for each package, instead of gtkd.paths.LIBRARY"
)
public
static
string
[]
getLoadFailures
(
LIBRARY
library
)
{
return
getLoadFailures
(
importLibs
[
library
]);
}
}
// Platform specific implementation below.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment