dlfcn_playground.go raw

   1  // SPDX-License-Identifier: Apache-2.0
   2  // SPDX-FileCopyrightText: 2024 The Ebitengine Authors
   3  
   4  //go:build faketime
   5  
   6  package purego
   7  
   8  import "errors"
   9  
  10  func Dlopen(path string, mode int) (uintptr, error) {
  11  	return 0, errors.New("Dlopen is not supported in the playground")
  12  }
  13  
  14  func Dlsym(handle uintptr, name string) (uintptr, error) {
  15  	return 0, errors.New("Dlsym is not supported in the playground")
  16  }
  17  
  18  func Dlclose(handle uintptr) error {
  19  	return errors.New("Dlclose is not supported in the playground")
  20  }
  21  
  22  func loadSymbol(handle uintptr, name string) (uintptr, error) {
  23  	return Dlsym(handle, name)
  24  }
  25