Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 28, 2025

The Dmod_GetName interface was only accessible in DMOD_SYSTEM mode. Modules needed access to query their own name from context at runtime.

Changes

  • Moved Dmod_GetName to builtin API in dmod.h: Added DMOD_BUILTIN_API( Dmod, 1.0, const char*, _GetName, (Dmod_Context_t* Context) ) alongside other context getters like _GetDifFunction
  • Removed declaration from dmod_system.h: Eliminated duplicate extern declaration now that function is exposed through macro system
  • Implementation unchanged: dmod_system.c implementation remains identical; runtime resolution handles both system and module access

The macro expands to input API in SYSTEM mode (provides implementation) and output API in MODULE mode (provides callable function pointer). Follows existing pattern used by 30+ builtin APIs like _LoadModule, _GetModuleVersion, etc.

// Modules can now call:
const char* name = Dmod_GetName(context);

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Interfejs Dmod_GetName powinien być dostępny dla modułów</issue_title>
<issue_description>Interfejs do pobierania nazwy modułu z contextu (Dmod_GetName) jest dostępny tylko w trybie DMOD_SYSTEM - trzeba użyć DMOD_BUILTIN_API i przenieść go do dmod.h aby był dostępny również w trybie DMOD_MODULE </issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Dec 28, 2025
Co-authored-by: JohnAmadis <17320783+JohnAmadis@users.noreply.github.com>
Copilot AI changed the title [WIP] Make Dmod_GetName interface available for modules Make Dmod_GetName available to modules via DMOD_BUILTIN_API Dec 28, 2025
Copilot AI requested a review from JohnAmadis December 28, 2025 22:33
@JohnAmadis JohnAmadis marked this pull request as ready for review December 28, 2025 22:47
@JohnAmadis JohnAmadis merged commit f9f3ef6 into develop Dec 28, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Interfejs Dmod_GetName powinien być dostępny dla modułów

2 participants