Proposal: Implement getval/setval types system while retaining backwards compatibility #19
LimpingNinja
started this conversation in
New Feature Ideas, Proposals, and Discussions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Implementing Typed sys_getval/sys_setval Functions
Overview
This document outlines the implementation of enhanced
sys_getvalandsys_setvalfunctions that support type-safe access to mudsettings while maintaining backward compatibility.Current Limitations
mudsys.sys_getval(key)andmudsys.sys_setval(key, val)mudsettingGetInt(),mudsettingGetBool(), etc.Proposed Enhancement
Add optional type parameter with string default:
mudsys.sys_getval(key, type="string")mudsys.sys_setval(key, value, type="auto")Implementation
1. Replace
mudsys_get_sys_valin/src/scripts/pymudsys.c2. Replace
mudsys_set_sys_valin/src/scripts/pymudsys.c3. Update Method Documentation in
PyInit_PyMudSys()Python Usage Examples
Backward Compatibility (unchanged)
New Typed Access
Error Handling
Features
Beta Was this translation helpful? Give feedback.
All reactions