-
Notifications
You must be signed in to change notification settings - Fork 817
Closed
Description
It's likely that platform specific implementation details will become scattered throughout the codebase making it less maintainable and less understandable.
I propose a change to the current include structure to better modularize platform specifics where possible. Specifically, update mruby.h
with the following
...
#ifndef MRUBY_H
#define MRUBY_H
#include
#include "mrbconf.h"
#if defined(__unix__) || defined(__POSIX__) || defined(__APPLE__)
# /* TODO: include "mrb-internal/mrb-unix.h" */
#else
# include "mrb-internal/mrb-win.h"
#endif
and start by consolidating all the applicable windows impl oddities into the include/mrb-internal/mrb-win.h
file. The goal is to minimize platform specific #ifdef
's in the *.c
files and allow for future platform specific include files, eg. mrb-internal/mrb-arm.h
.
An example of how this looks in real-world code:
Metadata
Metadata
Assignees
Labels
No labels