Re: function to check if a symbol in a library exists or not

  • From: Justin Cormack <justin@xxxxxxxxxxxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Mon, 30 Jul 2012 19:48:44 +0100

On Mon, Jul 30, 2012 at 7:41 PM, Cosmin Apreutesei
<cosmin.apreutesei@xxxxxxxxx> wrote:
> Ok, so application A is using cairo to output a PDF document, and
> application B to display stuff on screen via GDI. Two apps using two
> cairo API chunks which are optional to compile. Each app will break if
> the wrong cairo.dll is shipped with it, but I want both to work with
> the same cairo.lua file, so I don't think the argument "your app will
> break anyway" applies to middleware.
>

No i didn't mean that, but if the PDF app will want to test
availability, and then abort if it is not there, so it is not it will
only need to call the test code once. And as Mike said that a pcall
that doesnt fail is the same speed as a normal call you can just leave
that in.

Justin

Other related posts: