Skip to content

Add part of baselib functions only #255

Description

@wyxloading
  • GopherLua is a Lua5.1 implementation. You should be familiar with Lua programming language. Have you read Lua 5.1 reference manual carefully?
  • GopherLua is a Lua5.1 implementation. In Lua, to keep it simple, it is more important to remove functionalities rather than to add functionalities unlike other languages . If you are going to introduce some new cool functionalities into the GopherLua code base and the functionalities can be implemented by existing APIs, It should be implemented as a library.

Please answer the following before submitting your issue:

  1. What version of GopherLua are you using? : 1cd887c
  2. What version of Go are you using? : 1.13
  3. What operating system and processor architecture are you using? : linux/amd64
  4. What did you do? : N/A
  5. What did you expect to see? : N/A
  6. What did you see instead? : N/A

I want to add part of the baselib functions to LState, but there is no way to do that since every baselib function implementation is private.
What about add something like OpenBaseStrip which can pass a list of baselib function name, and add them to LState.

Activity

  1. tul commented on Dec 3, 2019

    @tul
    Contributor

    As a workaround, after calling OpenBase you can then access the table in your lua state and just nil out the unwanted functions before loading your lua code into it.

  2. Repository owner locked and limited conversation to collaborators on May 4, 2022
  3. converted this issue into a discussion #393 on May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions