Skip to content

Commit 4f574e7

Browse files
author
L'In20Cible
committed
- ADD_MEM_TOOLS/_WRAPPER macros are now retrieving the python class name dynamically.
1 parent b06be0f commit 4f574e7

27 files changed

+86
-86
lines changed

src/core/modules/bitbuffers/bitbuffers_wrap_python.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ void export_bf_write(scope _bitbuffers)
210210
&bf_write::m_iCurBit
211211
)
212212

213-
ADD_MEM_TOOLS(bf_write, "BitBufferWrite")
213+
ADD_MEM_TOOLS(bf_write)
214214
;
215215
}
216216

@@ -358,6 +358,6 @@ void export_bf_read(scope _bitbuffers)
358358
&bf_read::GetNumBitsRead
359359
)
360360

361-
ADD_MEM_TOOLS(bf_read, "BitBufferRead")
361+
ADD_MEM_TOOLS(bf_read)
362362
;
363363
}

src/core/modules/colors/colors_wrap_python.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,5 @@ void export_color(scope _colors)
8888
Color_.def(self != self);
8989

9090
// Add memory tools...
91-
Color_ ADD_MEM_TOOLS(Color, "Color");
91+
Color_ ADD_MEM_TOOLS(Color);
9292
}

src/core/modules/commands/commands_client_wrap_python.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,6 @@ void export_client_command_manager(scope _client)
9595
args("callable")
9696
)
9797

98-
ADD_MEM_TOOLS(CClientCommandManager, "ClientCommandDispatcher")
98+
ADD_MEM_TOOLS(CClientCommandManager)
9999
;
100100
}

src/core/modules/commands/commands_say_wrap_python.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,6 @@ void export_say_command_manager(scope _say)
9595
args("callable")
9696
)
9797

98-
ADD_MEM_TOOLS(CSayCommandManager, "SayCommandDispatcher")
98+
ADD_MEM_TOOLS(CSayCommandManager)
9999
;
100100
}

src/core/modules/commands/commands_server_wrap_python.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,6 @@ void export_server_command_manager(scope _server)
8787
args("callable")
8888
)
8989

90-
ADD_MEM_TOOLS(CServerCommandManager, "ServerCommandDispatcher")
90+
ADD_MEM_TOOLS(CServerCommandManager)
9191
;
9292
}

src/core/modules/commands/commands_wrap_python.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ void export_command(scope _commands)
128128
)
129129
.staticmethod("get_max_command_length")
130130

131-
ADD_MEM_TOOLS(CCommand, "Command")
131+
ADD_MEM_TOOLS(CCommand)
132132
;
133133
}
134134

@@ -207,6 +207,6 @@ void export_concommandbase(scope _commands)
207207
"Returns the DLL identifier."
208208
)
209209

210-
ADD_MEM_TOOLS(ConCommandBase, "ConCommandBase")
210+
ADD_MEM_TOOLS(ConCommandBase)
211211
;
212212
}

src/core/modules/cvars/cvars_wrap_python.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ void export_cvar_interface(scope _cvars)
107107
reference_existing_object_policy()
108108
)
109109

110-
ADD_MEM_TOOLS(ICvar, "_Cvar")
110+
ADD_MEM_TOOLS(ICvar)
111111
;
112112

113113
_cvars.attr("cvar") = object(ptr(g_pCVar));
@@ -146,7 +146,7 @@ void export_convar_interface(scope _cvars)
146146
"Returns whether the given flag is set."
147147
)
148148

149-
ADD_MEM_TOOLS(IConVar, "_IConVar")
149+
ADD_MEM_TOOLS(IConVar)
150150
;
151151
}
152152

@@ -222,7 +222,7 @@ void export_convar(scope _cvars)
222222
args("value")
223223
)
224224

225-
ADD_MEM_TOOLS(ConVar, "_ConVar")
225+
ADD_MEM_TOOLS(ConVar)
226226
;
227227
}
228228

src/core/modules/effects/effects_wrap_python.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ void export_prediction_system(scope _effects)
109109
)
110110
.staticmethod("suppress_events")
111111

112-
ADD_MEM_TOOLS(IPredictionSystem, "PredictionSystem")
112+
ADD_MEM_TOOLS(IPredictionSystem)
113113
;
114114
}
115115

@@ -171,7 +171,7 @@ void export_temp_entities_system(scope _effects)
171171
export_engine_specific_temp_entities_system(_effects, TempEntities);
172172

173173
// Add memory tools...
174-
TempEntities ADD_MEM_TOOLS(ITempEntsSystem, "_TempEntities");
174+
TempEntities ADD_MEM_TOOLS(ITempEntsSystem);
175175
}
176176

177177

@@ -209,5 +209,5 @@ void export_dispatch_effect_data(scope _effects)
209209
export_engine_specific_dispatch_effect_data(_effects, DispatchEffectData);
210210

211211
// Add memory tools...
212-
DispatchEffectData ADD_MEM_TOOLS(CEffectData, "DispatchEffectData");
212+
DispatchEffectData ADD_MEM_TOOLS(CEffectData);
213213
}

src/core/modules/engines/engines_wrap_python.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ void export_engine_server(scope _engines)
715715
.NOT_IMPLEMENTED("reserve_server_for_queued_game")
716716
.NOT_IMPLEMENTED("get_engine_hltv_info")
717717

718-
) ADD_MEM_TOOLS(IVEngineServer, "_EngineServer"); // IVEngineServer_Visitor
718+
) ADD_MEM_TOOLS(IVEngineServer); // IVEngineServer_Visitor
719719

720720
_engines.attr("engine_server") = object(ptr(engine));
721721
}
@@ -800,7 +800,7 @@ void export_engine_sound(scope _engines)
800800
// Only available for CS:GO
801801
.NOT_IMPLEMENTED("is_looping_sound")
802802

803-
) ADD_MEM_TOOLS(IEngineSound, "_EngineSound"); // IEngineSound_Visitor
803+
) ADD_MEM_TOOLS(IEngineSound); // IEngineSound_Visitor
804804

805805
_engines.attr("engine_sound") = object(ptr(enginesound));
806806

@@ -866,7 +866,7 @@ void export_engine_trace(scope _engines)
866866
.def("__init__", make_constructor(&Ray_tExt::CreateRay1))
867867
.def("__init__", make_constructor(&Ray_tExt::CreateRay2))
868868

869-
ADD_MEM_TOOLS(Ray_t, "Ray")
869+
ADD_MEM_TOOLS(Ray_t)
870870
;
871871

872872
class_<IEngineTrace, boost::noncopyable>("_EngineTrace", no_init)
@@ -939,7 +939,7 @@ void export_engine_trace(scope _engines)
939939
virtual bool GetBrushInfo( int iBrush, CUtlVector<Vector4D> *pPlanesOut, int *pContentsOut ) = 0;
940940
*/
941941

942-
ADD_MEM_TOOLS(IEngineTrace, "_EngineTrace")
942+
ADD_MEM_TOOLS(IEngineTrace)
943943
;
944944

945945
_engines.attr("engine_trace") = object(ptr(enginetrace));
@@ -977,7 +977,7 @@ void export_engine_trace(scope _engines)
977977
&CBaseTrace::startsolid
978978
)
979979

980-
ADD_MEM_TOOLS(CBaseTrace, "BaseTrace")
980+
ADD_MEM_TOOLS(CBaseTrace)
981981
;
982982

983983
_engines.attr("DISPSURF_FLAG_SURFACE") = DISPSURF_FLAG_SURFACE;
@@ -1028,7 +1028,7 @@ void export_engine_trace(scope _engines)
10281028
&CGameTrace::hitbox
10291029
)
10301030

1031-
ADD_MEM_TOOLS(CGameTrace, "GameTrace")
1031+
ADD_MEM_TOOLS(CGameTrace)
10321032
;
10331033

10341034
class_<csurface_t>("Surface")
@@ -1044,7 +1044,7 @@ void export_engine_trace(scope _engines)
10441044
&csurface_t::flags
10451045
)
10461046

1047-
ADD_MEM_TOOLS(csurface_t, "Surface")
1047+
ADD_MEM_TOOLS(csurface_t)
10481048
;
10491049

10501050
// Trace filter baseclass
@@ -1059,7 +1059,7 @@ void export_engine_trace(scope _engines)
10591059
"Returns the trace type."
10601060
)
10611061

1062-
ADD_MEM_TOOLS_WRAPPER(ITraceFilterWrap, ITraceFilter, "TraceFilter")
1062+
ADD_MEM_TOOLS_WRAPPER(ITraceFilterWrap, ITraceFilter)
10631063
;
10641064

10651065
// Enumerator baseclass
@@ -1069,7 +1069,7 @@ void export_engine_trace(scope _engines)
10691069
"Gets called with each handle."
10701070
)
10711071

1072-
ADD_MEM_TOOLS_WRAPPER(IEntityEnumeratorWrap, IEntityEnumerator, "EntityEnumerator")
1072+
ADD_MEM_TOOLS_WRAPPER(IEntityEnumeratorWrap, IEntityEnumerator)
10731073
;
10741074

10751075
// Trace types
@@ -1172,7 +1172,7 @@ void export_server_game_dll(scope _engines)
11721172
);
11731173

11741174
// Add memory tools...
1175-
ServerGameDLL ADD_MEM_TOOLS(IServerGameDLL, "_ServerGameDLL");
1175+
ServerGameDLL ADD_MEM_TOOLS(IServerGameDLL);
11761176

11771177
// Singleton...
11781178
_engines.attr("server_game_dll") = object(ptr(servergamedll));

src/core/modules/entities/entities_datamaps_wrap_python.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ void export_interval(scope _datamaps)
7474
Interval.def_readwrite("range", &interval_t::range);
7575

7676
// Add memory tools...
77-
Interval ADD_MEM_TOOLS(interval_t, "Interval");
77+
Interval ADD_MEM_TOOLS(interval_t);
7878
}
7979

8080

@@ -112,7 +112,7 @@ void export_datamap(scope _datamaps)
112112
export_engine_specific_datamap(_datamaps, DataMap);
113113

114114
// Add memory tools...
115-
DataMap ADD_MEM_TOOLS(datamap_t, "DataMap");
115+
DataMap ADD_MEM_TOOLS(datamap_t);
116116
}
117117

118118

@@ -149,7 +149,7 @@ void export_type_description(scope _datamaps)
149149
export_engine_specific_type_description(_datamaps, TypeDescription);
150150

151151
// Add memory tools...
152-
TypeDescription ADD_MEM_TOOLS(typedescription_t, "TypeDescription");
152+
TypeDescription ADD_MEM_TOOLS(typedescription_t);
153153
}
154154

155155

@@ -171,7 +171,7 @@ void export_input_data(scope _datamaps)
171171
InputData.def_readwrite("output_index", &inputdata_t::nOutputID);
172172

173173
// Add memory tools...
174-
InputData ADD_MEM_TOOLS(inputdata_t, "InputData");
174+
InputData ADD_MEM_TOOLS(inputdata_t);
175175
}
176176

177177

@@ -209,7 +209,7 @@ void export_variant(scope _datamaps)
209209
Variant.def("set_entity", &VariantSharedExt::set_entity);
210210

211211
// Add memory tools...
212-
Variant ADD_MEM_TOOLS(variant_t, "Variant");
212+
Variant ADD_MEM_TOOLS(variant_t);
213213
}
214214

215215

0 commit comments

Comments
 (0)