chore: add matlab sample program#20
Open
mir-huzaif wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a MATLAB sample that demonstrates calling the LexActivator native library via loadlibrary/calllib, and updates the MATLAB header copies accordingly. It also removes the legacy C/C++ sample project files under examples/.
Changes:
- Added
matlab/Sample.mshowing a basic activation / trial flow usingcalllib. - Updated MATLAB header copies (
matlab/LexActivator.h,matlab/LexTypes.h,matlab/LexStatusCodes.h) to reflect the intended API surface/types. - Removed prior
examples/build artifacts (VS solution/project,Makefile, and sample C++).
Reviewed changes
Copilot reviewed 7 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| matlab/Sample.m | New MATLAB sample script exercising core LexActivator calls. |
| matlab/LexTypes.h | Updates MATLAB-facing struct definitions used by loadlibrary. |
| matlab/LexStatusCodes.h | Minor formatting adjustment in the include guard line. |
| matlab/LexActivator.h | Adjusts MATLAB-facing API macros/docs and removes some declarations. |
| examples/Sample.cpp | Removed legacy C++ sample program. |
| examples/Makefile | Removed legacy Makefile-based build for the sample. |
| examples/Sample.sln | Removed legacy Visual Studio solution for the sample. |
| examples/Sample.vcxproj | Removed legacy Visual Studio project for the sample. |
Comments suppressed due to low confidence (2)
matlab/LexActivator.h:958
- Parameter name in the comment doesn’t match the function signature. GetActivationMeterAttributeUses() takes
uint32_t *uses, so the doc should refer touses(notallowedUses).
matlab/LexActivator.h:572 - PR title indicates adding a MATLAB sample, but this change also alters the public header surface (e.g., removing API declarations like GetLicenseEntitlementSetTier/GetLastActivationError/SyncLicenseActivation/SyncTrialActivation) and adjusts public struct definitions in LexTypes.h. If these are intentional breaking API changes, please document them and/or update the PR title/description accordingly; otherwise consider scoping header edits to MATLAB-only compatibility.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+69
to
+75
| function output = toString(input) | ||
| if ispc | ||
| output = [int8(input) 0]; | ||
| else | ||
| output = input; | ||
| end | ||
| end |
Comment on lines
+5
to
+8
| %Loads the C library of LexActivator | ||
| sHeaderFile = './LexActivator.h'; | ||
| sStatusHeaderFile = './LexStatusCodes.h'; | ||
| sSharedLibrary = 'LexActivator'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.