Skip to content

Commit

Permalink
Fix header function tick-tocks
Browse files Browse the repository at this point in the history
Signed-off-by: methylDragon <[email protected]>
  • Loading branch information
methylDragon committed Jun 7, 2022
1 parent 99f13c6 commit d877071
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ release will remove the deprecated code.
* `IGN_GAZEBO_PLUGIN_INSTALL_DIR`
* `IGN_GAZEBO_GUI_PLUGIN_INSTALL_DIR`
* `IGN_GAZEBO_WORLD_INSTALL_DIR`

* `ignitionGazeboVersion()` is deprecated and will be removed in future versions.
Please use `gzSimVersion()` instead.


## Gazebo Sim 6.1 to 6.2
Expand Down
6 changes: 3 additions & 3 deletions src/cmd/cmdgazebo.rb.in
Original file line number Diff line number Diff line change
Expand Up @@ -353,11 +353,11 @@ has properly set the DYLD_LIBRARY_PATH environment variables."
end

# Read the library version.
Importer.extern 'char *ignitionGazeboVersion()'
Importer.extern 'char *gzSimVersion()'
begin
plugin_version = Importer.ignitionGazeboVersion.to_s
plugin_version = Importer.gzSimVersion.to_s
rescue DLError
puts "Library error: Problem running 'ignitionGazeboVersion()' from #{plugin}."
puts "Library error: Problem running 'gzSimVersion()' from #{plugin}."
exit(-1)
end

Expand Down
7 changes: 6 additions & 1 deletion src/ign.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,16 @@
#include "gz/sim/gui/Gui.hh"

//////////////////////////////////////////////////
extern "C" char *ignitionGazeboVersion()
extern "C" char *gzSimVersion()
{
return strdup(GZ_SIM_VERSION_FULL);
}

extern "C" char *ignitionGazeboVersion()
{
return gzSimVersion();
}

//////////////////////////////////////////////////
extern "C" char *gazeboVersionHeader()
{
Expand Down
3 changes: 2 additions & 1 deletion src/ign.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@

/// \brief External hook to read the library version.
/// \return C-string representing the version. Ex.: 0.1.2
extern "C" char *ignitionGazeboVersion();
extern "C" char *gzSimVersion();
extern "C" char GZ_DEPRECATED(7) *ignitionGazeboVersion();

/// \brief Get the Gazebo version header.
/// \return C-string containing the Gazebo version information.
Expand Down

0 comments on commit d877071

Please sign in to comment.